#页面类
from ykmn2.Base.Base import Base
from selenium.webdriver.common.by import By
from time import sleep

class Page(Base):
    def host(self):
        self.open_url('https://mail.sohu.com/ ')
    #定位器
    sjh_loc=(By.XPATH,'//*[@id="theme"]/form/div[1]/div[1]/input')
    mm_loc=(By.XPATH,'//*[@id="theme"]/form/div[2]/div[1]/input')
    button_loc=(By.XPATH,'//*[@id="theme"]/form/div[5]/input')
    #页面元素封装
    def sjh(self):
        self.send_keys(self.sjh_loc,'17829189973@sohu.com')
    def mm(self):
        self.send_keys(self.mm_loc,'Zhn17829189973')
    def button(self):
        self.click(self.button_loc)